package com.example.nio.intbuffer;

import java.nio.IntBuffer;

/**
 * @author panghu
 * @version 1.0.0
 * @createTime 2023年08月05日 15:08:00
 * @Description
 */
public class Demo05 {

    public static void main(String[] args) {
        IntBuffer wrap = IntBuffer.wrap(new int[]{1, 2, 3, 4, 5});
        System.out.println(wrap.get());//pos=1
        wrap.mark(); //mark=1
        System.out.println(wrap.get());//pos=2
        wrap.reset();//pos = mark = 1
        System.out.println(wrap.get());
    }

}
